pp108 : oncolorchange Event

oncolorchange Event


This event is fired when a color is changed.

Syntax

Inline HTML

<ELEMENT id=colorPickerID class="colorpicker" oncolorchange="handler()" ... />

Event property

colorPickerID.oncolorchange = handler


Event Information

To invoke

Change color in the horizontal sliders of the control. Call the setColor() method to set the color in the control.

Default Action

Changes the color in the sliders and initiates any action associated with this event.


Event Object Properties


Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.

Property

Description

color

Read-only. Object that denotes the color set in the colorPicker. Independent colors set in the colorPicker can be accessed by using the "." operator. For example,event.color.rretrieves the red color set in the control.

rgb

Read-only. String that retrieves the RGB colors set in the colorPicker. The format of the string will be "RGB(redValue, greenValue, blueValue)".

hex

Read-only. String that retrieves the hexadecimal value of the color set in the colorPicker.


See Also


colorPicker